package com.example.designpatterns.Strategy.BasicCode;

/**
 * @author HUAWEI
 * 上下文
 */
public class Context {
    Strategy strategy;
    /**
     * 初始化时，传入具体的策略
     */
    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public void contextInterface(){
        strategy.algorithmInterface();
    }
}
